<!-- #include file="conn.asp" --><%
SiteSettings=Conn.Execute("[BBSXP_SiteSettings]")
Response.contentType="application/xml;charset=gbk"
%><?xml version="1.0" encoding="gb2312"?>
<?xml-stylesheet type="text/xsl" href="inc/rss.xsl" version="1.0"?>
<rss version="2.0">
<channel>
<%
if Request("ForumID")<>"" then
ForumID=int(Request("ForumID"))
if Conn.Execute("Select PermissionsRead From [BBSXP_ForumPermissions] where ForumID="&ForumID&" and RoleID=0")(0)=0 then
response.write "</channel></rss>"
Response.End
end if


sql="select * from [BBSXP_Forums] where id="&ForumID&""
Set Rs=Conn.Execute(sql)
ChannelTitle=RS("ForumName")
ImageUrl=RS("ForumLogo")
Set Rs = Nothing
if ImageUrl="" then ImageUrl=""&SiteSettings("SiteURL")&"/images/Logo.gif"
ChannelLink=""&SiteSettings("SiteURL")&"ShowForum.asp?ForumID="&ForumID&""
%>

<image>
<link><%=ChannelLink%></link>
<url><%=ImageUrl%></url>
</image>
<title><%=ChannelTitle%></title>
<link><%=ChannelLink%></link>
<%
sql="select top "&SiteSettings("ThreadsPerPage")&" * from [BBSXP_Threads] where IsDel=0 and ForumID="&ForumID&" order by id desc"
Set Rs=Conn.Execute(sql)
do while Not Rs.Eof
%>
<item>
<title><%=Rs("Topic")%></title>
<category><%=Rs("SpecialTopic")%></category>
<author><%=Rs("UserName")%></author>
<pubDate><%=Rs("PostTime")%></pubDate>
<link><%=SiteSettings("SiteURL")%>ShowPost.asp?ThreadID=<%=Rs("id")%></link><description><![CDATA[<%=Conn.Execute("Select Content From [BBSXP_Posts"&Rs("PostsTableName")&"] where ThreadID="&Rs("id")&" and IsTopic=1")(0)%>]]></description></item><%
Rs.MoveNext
Loop
Set Rs = Nothing
elseif Request("BlogUserName")<>"" then
BlogUserName=HTMLEncode(Request("BlogUserName"))
sql="select * from [BBSXP_BlogSettings] where UserName='"&BlogUserName&"'"
Set Rs=Conn.Execute(sql)
if Rs("BlogPermissions")<>"everyone" and Rs("BlogPermissions")<>"" then
response.write "</channel></rss>"
Response.End
end if
ChannelTitle=Rs("BlogTitle")
ChannelLink=""&SiteSettings("SiteURL")&"blog.asp?BlogUserName="&BlogUserName&""
Set Rs = Nothing
%>


<title><%=ChannelTitle%></title><link><%=ChannelLink%></link><%
sql="[BBSXP_Blogs] where UserName='"&BlogUserName&"' and ParentID=0"
Set Rs=Conn.Execute(""&sql&" order by id Desc")
do while Not Rs.Eof
%><item><title><%=Rs("Subject")%></title><category><%=Rs("Category")%></category><author><%=Rs("UserName")%></author><pubDate><%=Rs("DateCreated")%></pubDate>
<link><%=SiteSettings("SiteURL")%>Blog.asp?BlogUserName=<%=Rs("UserName")%>&amp;menu=ShowBlog&amp;BlogID=<%=Rs("ID")%></link><description><![CDATA[<%=Rs("content")%>]]></description></item><%
Rs.MoveNext
Loop
Set Rs = Nothing
end if
%></channel></rss>/